package pro.seac.twitter.application;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

import pro.seac.twitter.application.dto.UserAccountData;

@Service
public class UserDetailsService implements org.springframework.security.core.userdetails.UserDetailsService {
	@Autowired
	private UserManagementService userManagementService;

	@Override
	public UserAccountData loadUserByUsername(String username) throws UsernameNotFoundException {
		return userManagementService.getUserAccountByUserName(username);
	}

}
